<template>
  <intro-view :usage="usage">
    <div ref="page">
      <!--{{date}}-->
      <ui-date-picker v-model="date" immediate></ui-date-picker>
      <button @click="showDatePicker">showDatePickerDialog</button>
    </div>
  </intro-view>
</template>

<script>
  import usage from './usage.md'
  export default {
    data() {
      return {
        usage,
        date: '2018-05-15'
      }
    },
    methods: {
      showDatePicker () {
        this.$UiDatePickerDialog.new({
          onEl: this.$refs['page'],
          value: '2019',
          // splite: '-',
          // 点击确定回调地址
          callback: (value) => { console.log(value) }
        })
      }
    }
  }
</script>
